#pragma once
#include "coordinate.h"
#include <vector>
#include <iostream>
using namespace std;

/** 
 * This class implements a mask for the neighborhood. It holds 
 * the radius of the neighborhood and the masked (don't care)
 * neighbors.
 */
class NBMask
{
private:
	int radius;
	vector<Coordinate> exceptions;
public:
	NBMask();
	NBMask(int r, vector<Coordinate>& exs);
	NBMask(int r);
	NBMask(const NBMask& other);
	/** 
	 * Returns the coordinate of the neighbors of the given center cell if this mask is applied.
	 * Might return negative or out of limit coordinates.
	 */
	vector<Coordinate> apply (const Coordinate& center) const;
	NBMask& operator= (const NBMask& other);

	friend ostream& operator<< (ostream& os, const NBMask& mask);
};